package com.sly.demoim.helper;

import com.sly.demoim.controller.ChatWebSocket;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 聊天websocket帮助类
 *
 * @author SLY
 * @date 2022/7/24
 */
@Component
public class ChatWebSocketHelper {

    /**
     * concurrent包的线程安全Set，用来存放每个客户端对应的MyWebSocket对象。
     */
    public static final Map<String, ChatWebSocket> SOCKETS = new ConcurrentHashMap<>(1024);
}
